package com.soft.collateral.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 押品台账表
 * </p>
 *
 * @author liubin
 * @since 2025-08-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edger")
@ApiModel(value="Edger对象", description="押品台账表")
public class Edger implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "台账id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "台账编号")
    @TableField("edger_number")
    private String edgerNumber;

    @ApiModelProperty(value = "押品编号")
    @TableField("collateral_id")
    private Integer collateralId;

    @ApiModelProperty(value = "最新估值")
    @TableField("valuation")
    private Double valuation;

    @ApiModelProperty(value = "关联合同")
    @TableField("contracts_id")
    private Integer contractsId;

    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "Asia/Shanghai")
    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private LocalDate updateTime;

}
